var status = -1;
var selectionLog = [];

function start() {
    status = -1;
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.resetForcedStat();
            if (cm.isQuestActive(32280)) {
                cm.warp(130030006, 0, true);
                cm.playerMessage(1, "与伦多对话吧！");
                cm.dispose();
                return
            }
            cm.hideNpc(2152018);
            cm.hideNpc(2152020);
            cm.npc_ChangeController(2152018, "oid=23571", 1451, 535, 701, 1401, 1501, 1, false, 0, true);
            if (!cm.isQuestFinished(23938)) {
                cm.npc_ChangeController(2152020, "oid=23584", 1694, -59, 102, 1644, 1744, 1, false, 0, true)
            }
            cm.hideNpc(9000393);
            cm.hideNpc(9400495);
            cm.hideNpc(9400496);
            cm.dispose()
        }
    }
};